package com.unience.ec2.eclipse;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import com.unience.ec2.eclipse.treeviewer.ui.MovingBoxView;
import com.unience.ec2.eclipse.view.Ec2MonitorViewPart;
import com.unience.ec2.eclipse.view.ListEc2InstancesViewPart;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		
		/*layout.addStandaloneView(NavigationView.ID,  false, IPageLayout.LEFT, 0.25f, editorArea);
		IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
		folder.addPlaceholder(View.ID + ":*");
		folder.addView(View.ID);
		
		layout.getViewLayout(NavigationView.ID).setCloseable(false);
		
		*/
		
	
	  
    	layout.addStandaloneView(MovingBoxView.ID,  false, IPageLayout.LEFT, 0.25f, editorArea);
		IFolderLayout folder = layout.createFolder("Ec2 Monitor", IPageLayout.TOP, 0.5f, editorArea);
		folder.addPlaceholder(Ec2MonitorViewPart.ID_VIEW + ":*");
		folder.addView(Ec2MonitorViewPart.ID_VIEW);
		
		IFolderLayout folder2 = layout.createFolder("List Ec2Instances", IPageLayout.TOP, 0.5f, editorArea);
		folder2.addPlaceholder(ListEc2InstancesViewPart.ID_VIEW + ":*");
		folder2.addView(ListEc2InstancesViewPart.ID_VIEW);
		
		
		layout.getViewLayout(MovingBoxView.ID).setCloseable(false);
	}
}
